 public class Student extends Person {
    //extends 子类继承父类
    public String studentID;
    public String className;
    public int score;
    public static String schoolName;
    //空构造函数
    public Student(){};
    //super  显示调用父类的构造器，必须放在子类构造器的第一行
    public Student(String id, String name, String gender, String birthday, String nationality,
                   String studentID, String className, int score, String schoolName)
    {
        super(id, name, gender, birthday, nationality);
        this.studentID = studentID;
        this.className = className;
        this.score = score;
        Student.schoolName = schoolName;
    }

    @Override
     public String toString()
     {
         return "Student {" +
                 "id='" + id + '\'' +
                 ", name='" + name + '\'' +
                 ", gender='" + gender + '\'' +
                 ", birthday='" + birthday + '\'' +
                 ", nationality='" + nationality + '\'' +
                 ", studentID='" + studentID + '\'' +
                 ", className='" + className + '\'' +
                 ", score=" + score +
                 ", schoolName='" + schoolName + '\'' +
                 '}';
     }

     public void takeLesson(String course)
     {
         System.out.println(this.name + "选修了" + course);
     }
    //必须子类中包含working 否则报错
     @Override
     public void Working(String info)
     {
         System.out.println(this.name + "正在学" + info);
     }
}
